package com.maxmlr.mybatisplus.enums;

import com.baomidou.mybatisplus.extension.api.IErrorCode;

public enum ErrorCode implements IErrorCode {
	SUCCESS(200, "调用成功！"),
	PARAMS_VALID_ERROR(2001,"参数校验数组不能为空"),
	PARAMS_NULL_ERROR(2002,"参数名：%s,不能为空"),
	TEST(500, "测试错误编码");

	private long code;
	private String msg;

	ErrorCode(final long code, final String msg) {
		this.code = code;
		this.msg = msg;
	}

	@Override
	public long getCode() {
		return code;
	}

	@Override
	public String getMsg() {
		return msg;
	}

}
